﻿@using viBook.Controllers
<ul class="tabs">
    <li id="profile_lnk">
        @Html.ActionLink("Profile", "Details", "Account")
    </li>
    @if (!SessionPersiter.User.IsExternal)
    {
        <li id="pwd_lnk">
            @Html.ActionLink("Change password", "ChangePassword", "Account")
        </li>        
    }
</ul>
<script type="text/javascript">
    $(document).ready(function () {
        var currentUrl = document.location.href.toLowerCase();
        if (currentUrl.indexOf("/account/details") != -1) {
            $("#pwd_lnk").removeClass("active");
            $("#profile_lnk").addClass("active");
        }
        if (currentUrl.indexOf("/account/changepassword") != -1) {
            $("#profile_lnk").removeClass("active");
            $("#pwd_lnk").addClass("active");
        }
    });
</script>